package com.kfh.ybracelet.sort;

import com.kfh.ybracelet.bean.AddressBean;

import java.util.Comparator;

/**
 * Created by Aaron on 16/5/18.
 */
public class ChooseNumsComparator implements Comparator<AddressBean.ContactsEntity> {

    public int compare(AddressBean.ContactsEntity c1, AddressBean.ContactsEntity c2) {
        if (c1.user.sortLetters.equals("@")
                || c2.user.sortLetters.equals("#")) {
            return -1;
        } else if (c1.user.sortLetters.equals("#")
                || c2.user.sortLetters.equals("@")) {
            return 1;
        } else {
            return c1.user.sortLetters.compareTo(c2.user.sortLetters);
        }
    }

}
